<?php
$this->breadcrumbs = array(
    '综合产品管理' => array('productBase/admin'),
    '查看',
);
?><div class="box corners shadow">
    <div class="box-header">
        <h2>查看 <?php echo $model->p_name; ?></h2></h2>
        <div class="box-header-ctrls">	
            <a href="javascript:void(null);" title="" class="close"><!-- --></a>
        </div>
    </div>
    <div class="box-content" id="contacts-1a">
        <div class="inbox-sf">
            <?php
            echo CHtml::link('<span>删除</span>', '#', array(
                'submit' => array('delete'),
                'class' => 'button black fr',
                'confirm' => '您确定要删除吗?'
            ));
            ?>            <a class="button black fr" href=" <?php echo $this->rewriteCreateUrl('create'); ?>">
                <span>创建</span>
            </a>
            <a class="button black fr" href=" <?php echo $this->rewriteCreateUrl('update', array('id' => $model->id)); ?>">
                <span>编辑</span>
            </a>
            <a class="button black fr" href=" <?php echo $this->rewriteCreateUrl('admin'); ?>">
                <span>管理</span>
            </a>
        </div>
        <?php
        $this->widget('zii.widgets.CDetailView', array(
            'data' => $model,
            'cssFile' => '',
            'htmlOptions' => array('class' => 'tablelist'),
            'attributes' => array(
                'id',
                array(
                    'name' => 'p_game',
                    'value' => ProductCategory::model()->getGameNameById($model->p_game),
                ),
                array(
                    'name' => 'p_type',
                    'value' => Yii::app()->params[$model->p_type]
                ),
                'p_name',
                'p_price',
                'p_quntity',
                'p_rebate',
                array(
                    'name' => 'p_note',
                    'type' => 'raw',
                ),
                array(
                    'name' => 'p_img',
                    'type' => 'html',
                    'value' => CHtml::image(Yii::app()->baseUrl."/".$model->p_img),
                ),
                array(
                    'name' => '其它属性',
                    'type' => 'raw',
                    'value' => ProductAttribute::model()->showAttValue($model->id),
                )
            ),
        ));
        ?>
    </div>
</div>